//---------------------------------------------------------------------------

#ifndef Unit1H
#define Unit1H
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ScktComp.hpp>
#include <ComCtrls.hpp>
#include <ExtCtrls.hpp>
//---------------------------------------------------------------------------

#include <vector>
#include "E:\cygwin\home\latitude d600\firebot_arm\commands.h"
#include <ExtCtrls.hpp>


using namespace std;

//---------------------------------------------------------------------------
class TForm1 : public TForm
{
__published:	// IDE-managed Components
        TClientSocket *ClientSocket1;
        TMemo *Memo1;
        TButton *Button1;
        TCheckBox *CheckBox1;
        TCheckBox *CheckBox2;
        TStatusBar *StatusBar1;
        TButton *Button2;
        TButton *Button3;
        TButton *Button4;
        TCheckBox *CheckBox3;
        TTimer *Timer1;
        TCheckBox *CheckBox4;
        TButton *Button5;
        TGroupBox *GroupBox1;
        TGroupBox *GroupBox2;
        TButton *Button6;
        TCheckBox *CheckBox5;
        TCheckBox *CheckBox6;
        TCheckBox *CheckBox7;
        TCheckBox *CheckBox8;
        TCheckBox *CheckBox9;
        TCheckBox *CheckBox10;
        TCheckBox *CheckBox11;
        TCheckBox *CheckBox12;
        TCheckBox *CheckBox13;
        TCheckBox *CheckBox14;
        TCheckBox *CheckBox15;
        TCheckBox *CheckBox16;
        TCheckBox *CheckBox17;
        TCheckBox *CheckBox18;
        TGroupBox *GroupBox3;
        TShape *Shape1;
        TButton *Button7;
        TImage *Image1;
        TLabel *Label1;
        TLabel *Label2;
        TLabel *Label3;
        TLabel *Label4;
        TTrackBar *TrackBar1;
        TTrackBar *TrackBar2;
        TLabel *Label5;
        TButton *Button8;
        TEdit *Edit1;
        TCheckBox *CheckBox19;
        TButton *Button9;
        TEdit *Edit2;
        void __fastcall ClientSocket1Read(TObject *Sender,
          TCustomWinSocket *Socket);
        void __fastcall ClientSocket1Connecting(TObject *Sender,
          TCustomWinSocket *Socket);
        void __fastcall Button1Click(TObject *Sender);
        void __fastcall ClientSocket1Connect(TObject *Sender,
          TCustomWinSocket *Socket);
        void __fastcall ClientSocket1Disconnect(TObject *Sender,
          TCustomWinSocket *Socket);
        void __fastcall Button2Click(TObject *Sender);
        void __fastcall Button3Click(TObject *Sender);
        void __fastcall ClientSocket1Error(TObject *Sender,
          TCustomWinSocket *Socket, TErrorEvent ErrorEvent,
          int &ErrorCode);
        void __fastcall Button4Click(TObject *Sender);
        void __fastcall Timer1Timer(TObject *Sender);
        void __fastcall FormMouseMove(TObject *Sender, TShiftState Shift,
          int X, int Y);
        void __fastcall FormKeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
        void __fastcall FormKeyPress(TObject *Sender, char &Key);
        void __fastcall Memo1KeyDown(TObject *Sender, WORD &Key,
          TShiftState Shift);
        void __fastcall Button5Click(TObject *Sender);

        void __fastcall CheckBox4Click(TObject *Sender);
        void __fastcall Memo1KeyUp(TObject *Sender, WORD &Key,
          TShiftState Shift);
        void __fastcall Button6Click(TObject *Sender);
        void __fastcall Button7Click(TObject *Sender);
        void __fastcall Button8Click(TObject *Sender);
        void __fastcall Button9Click(TObject *Sender);
        void __fastcall TrackBar2Change(TObject *Sender);
        void __fastcall TrackBar1Change(TObject *Sender);

        //---------------------------------------------------------------------------


private:	// User declarations
public:		// User declarations
        __fastcall TForm1(TComponent* Owner);
//---------------------------------------------------------------------------
       void process(unsigned char* buffer, int len);
       //---------------------------------------------------------------------------
       void loghex(char *what, unsigned char *buf, int length);
       void KILL_EVENT();

       vector<int> keys;


};
//---------------------------------------------------------------------------
extern PACKAGE TForm1 *Form1;
//---------------------------------------------------------------------------
#endif
